#include <memory>
#include "third_party/glad/glad.h"
#include "texture.h"

namespace inkstone {
    class TextureManager {
    public:
        static TextureManager& getInstance();

        std::shared_ptr<inkstone::Texture> loadTexture(const std::string& path);
        std::shared_ptr<inkstone::Texture> getTexture(const std::string& path);
        void unloadTexture(const std::string& path);

    private:
        std::unordered_map<std::string, std::weak_ptr<inkstone::Texture>> textureCache_;
        std::shared_ptr<inkstone::Texture> createTexture(const std::string& path);
    };
}

